package jp.co.ikd.util;

import java.util.Calendar;
import java.util.Date;

public class DateUtilβ2 extends Date{

	private static final long serialVersionUID = 1L;

	DateUtilβ2 da01adateutilβ2;

	Date date;

	public DateUtilβ2(Date date) {
	};

	public static Date addYear(Date date, int year) {

		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		cal.add(Calendar.YEAR, year);

		return cal.getTime();
	}

	public static Date addMonth(Date date, int month) {

		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		cal.add(Calendar.MONTH, month);

		return cal.getTime();
	}

	public static Date addDay(Date date, int day) {

		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		cal.add(Calendar.DATE, day);

		return cal.getTime();
	}
}
